From 2f909cc474bf3b72f51eb2cac78a064d395988a1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 22 Aug 2017 06:41:31 -0400 Subject: [PATCH] Don't consume too many key releases The Emoji input support in GtkIMContextSimple was unintentionally consuming too many key release events. Fix this. https://bugzilla.gnome.org/show_bug.cgi?id=786594 --- gtk/gtkimcontextsimple.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index c83e0495dc..a27cb57507 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -1177,11 +1177,14 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, gtk_im_context_simple_commit_char (context, priv->tentative_match); priv->compose_buffer[0] = 0; + return TRUE; } else if (priv->in_emoji_sequence || (priv->in_hex_sequence && n_compose == 0)) { priv->modifiers_dropped = TRUE; + + return TRUE; } else if (priv->in_hex_sequence) { @@ -1195,12 +1198,12 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, g_signal_emit_by_name (context_simple, "preedit-changed"); g_signal_emit_by_name (context_simple, "preedit-end"); - } - return TRUE; + return TRUE; + } } - else - return FALSE; + + return FALSE; } /* Ignore modifier key presses */ -- 2.30.2